---
import BaseLayout from "@layouts/Layout.astro";
import { getone } from "@libs/config/dbconfig";
const data = await await getone(Astro.params.sulg);
// No product found
if(!data) {
  return new Response(null, {
    status: 404,
    statusText: 'Not found'
  });
}

const title = data.title
const description = data.description
---
<BaseLayout content={ {title,description} }>
<h1>{data.title}</h1>
<p>{data.description}</p>
</BaseLayout>

<style>
  h1 {
    @apply font-extrabold  font-extrabold text-4xl colors-primary flex font-sans;
  }
  p {
    @apply colors-secondary  text-xl flex font-sans flex;
  }
</style>